﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="EventArgs.cs" company="Mark Christian D. Menchavez">
//   Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace MCDM
{
    using System;

    /// <summary>
    /// A generic event argument.
    /// </summary>
    /// <typeparam name="T">The type contained within the <see cref="EventArgs{T}" /> instance.</typeparam>
    public class EventArgs<T> : EventArgs
    {
        private readonly T data;

        /// <summary>
        /// Initializes a new instance of the <see cref="EventArgs{T}" /> class.
        /// </summary>
        /// <param name="data">The data.</param>
        public EventArgs(T data)
        {
            this.data = data;
        }

        /// <summary>
        /// Gets the data.
        /// </summary>
        /// <value>
        /// The data.
        /// </value>
        public T Data
        {
            get
            {
                return this.data;
            }
        }
    }
}
